// malred-vue-template-js/src/api/admin/index.js
/*
 * @Author Malred
 * @Date 2025-05-31 18:26:11
 * @Description
 */
import request from "../../../request.js";

export default ({
    // 查询全部
    queryBook(body) {
        return request({url: '/api/book', method: 'get', data: '', params: body})
    },
    // 根据id查询单个
    queryBookDetail(id) {
        return request({url: '/api/book' + id, method: 'get', data: '', params: ''})
    },
    // 添加
    addBook(body) {
        return request({url: '/api/book', method: 'post', data: body, params: ''})
    },
    // 修改
    editBook(body, id) {
        return request({url: '/api/book' + id, method: 'put', data: body, params: ''})
    },
    // 删除
    deleteBook(ids) {
        return request({url: '/api/book' + ids.join(','), method: 'delete', data: '', params: ''})
    },
})